package cn.xianyang.org.domain;

import cn.xianyang.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data   /*lombok 注解自动生成getter和setter 构造器和toString */
public class Department extends BaseDomain {

    private String sn;

    private String name;

    //子部门树字段(一对多)
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children = new ArrayList<>();

    private String dirPath;

    private Integer state;

    private Long manager_id;
    private Employee manager;//部门管理员

    private Long parent_id;
    private Department parent;//部门上级部门

    private Long shop_id;


}
